;
(function($,win)
{
	/* @------------------------------------------------------------------------------------@ */
	$(document).ready(function()
	{
		$('#addnew').click(function(){
			
			 window.location.href = jumpPath+'view/system/organization/addorganization.jsp';
		});
		
		
		$('#btn_save').bind('click',add);
		
	});// the end

	/* @-----------------------------------------------------------------------------------------@ */
})(jQuery, window);

/**
 * 
 * @METHODNAME: add
 * @METDHOD:
 * @Description: 添加组织
 * @author Administrator
 * @date 2014年12月29日 下午8:00:20
 */
function add()
{
	//$('input[name="name"]').val()
	var reqPath = basePath+'/organization/addOrganization.action';
	var data ='{"description":"'+$('input[name="description"]').val()+'","name":"'+$('input[name="name"]').val()+'"}';
	send(reqPath,"POST","application/json","json",data,function(data){
		
		if(data.result=='error')
		{
			alert(data.errorMsg);
		}else if(data.result=='success')
		{
			alert('操作成功!');
		}
	});
}